home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 7
/
FM Towns Free Software Collection 7.iso
/
taropyon
/
guilib3
/
inc
/
wind.h
< prev
next >
Wrap
C/C++ Source or Header
|
1993-11-30
|
4KB
|
120 lines
/* :*****************************************************************
: "wind.h" : system“Pride”ウィンドゥ・ライブラリ
:*****************************************************************
*/
#ifndef _WIND_H
#define _WIND_H
#ifndef _GUIDEFS_H
# include <guidefs.h>
#endif
#ifndef _TIME_H
# include <time.h>
#endif
#define WINSTT_SLEEP (-1) /* おやすみ */
#define WINSTT_OFF (0) /* 非表示中 */
#define WINSTT_DSP (1) /* 表示中 */
typedef struct _winfr
{
struct _winfr *next;
FRAME fr;
} WINFR_T;
typedef struct
{
char *mskBuf; /* 画面マスク用バッファ */
size_t mskSiz; /* マスク領域のサイズ */
FRAME vramFr; /* VRAMの大きさ */
WINFR_T *dspFr; /* 描画範囲 */
WINFR_T *mskFr; /* マスク範囲 */
} WINDSP_T;
typedef struct _win_t
{
struct _win_t *next;
struct _win_t *link;
struct _win_t *back;
int id; /* ID number */
int stt; /* ステータス */
int prio; /* プライオリティ(not use) */
FRAME fr; /* ウィンドゥ枠 */
WINDSP_T winDsp; /* 表示ワーク用 */
time_t updateTime; /* 更新時間 */
int accChk; /* アクセスチェック */
void (*func)( struct _win_t *, int);
/* 描画関数 */
void *ptr; /* 描画関数用のパラメータポインタ */
} WIN_T;
#define WIN_ID WIN_T
typedef struct _winsys_t /* ベースウィンドゥ管理構造体 */
{
WIN_T *top; /* 先頭ウィンドゥ */
WIN_T *act; /* アクティブウィンドゥ */
int page; /* 書き込みページ */
FRAME fr; /* ウィンドゥ範囲 */
char *mskBuf; /* 画面マスク用バッファ */
size_t mskSiz; /* マスク領域のサイズ */
FRAME vramFr; /* VRAMの大きさ */
WINFR_T *dspFr; /* 描画範囲 */
WINFR_T *mskFr; /* マスク範囲 */
int accChk; /* アクセスチェック */
int (*func)(struct _winsys_t *, FRAME *);
/* ベース画面描画実行関数 */
void *ptr; /* ユーザー用汎用ポインタ */
} WINSYS_T;
#define WINSYS WINSYS_T
/* 非表示状態のウィンドゥもマッチ */
#define WINCHKSTT(stt) ( ((stt)&0x80)==0 && (stt)>=0 )
/* 完全表示中のものだけ */
#define WINCHKSTT2(stt) ( ((stt)&0x80)==0 && (stt)> 0 )
extern WINSYS_T *WIN_init( int page, int x1, int y1, int x2, int y2, int (*func)(WINSYS_T *,FRAME *), void *ptr );
extern int WIN_drawBaseScrn( WINSYS_T *wsys, FRAME *fr );
extern int WIN_delBase( WINSYS_T *winSys );
extern void WIN_redraw( WINSYS_T *wsys );
extern WIN_T *WIN_select( WINSYS_T *wsys, int x, int y);
extern WIN_T *WIN_open( WINSYS_T *wsys, int id, int x1, int y1, int x2, int y2, void (*func)(WIN_T *,int), void *ptr );
extern WIN_T *WIN_childOpen( WINSYS_T *wsys, WIN_T *parentWin, int x1, int y1, int x2, int y2, void (*func)(WIN_T *,int), void *ptr );
extern int WIN_dsp( WINSYS_T *wsys, WIN_T *win );
extern int WIN_active( WINSYS_T *wsys, WIN_T *win );
extern int WIN_sleep( WINSYS_T *wsys, WIN_T *win);
extern int WIN_close( WINSYS_T *wsys, WIN_T *win );
extern int WIN_childClose( WINSYS_T *wsys, WIN_T *win, WIN_T *childWin );
extern int WIN_resize( WINSYS_T *wsys, WIN_T *win, int x1, int y1, int x2, int y2 );
extern int WIN_move( WINSYS_T *wsys, WIN_T *win, int x0, int y0 );
/* "win020.c" ------------------------------------------------*/
#define WIN_ANI_CLK (48*CLOCKS_PER_SEC/100)
#define WIN_ANI_CLK2 (26*CLOCKS_PER_SEC/100)
#define WinMoveAnime(newFr,oldFr,clk) \
BoxMoveAnime( (newFr), (oldFr), DspCtrl.writePage, (clk) )
extern int WinResize( FRAME *fr, int xmax, int xmin, int ymax, int ymin );
extern int WinMove2( FRAME *fr, int xdt , int ydt );
extern int WinMove( FRAME *fr );
/* "win021.c" ------------------------------------------------*/
extern int WinCorrectMove( FRAME *ar, FRAME *fr );
/* "win031.c" ------------------------------------------------*/
extern int WinChkOnFrame( WINSYS_T *wsys, WIN_T *win, FRAME *fr );
extern int WinChkOnArea( WINSYS_T *wsys, WIN_T *win, int x1, int y1, int x2, int y2 );
/* "win040.c" ------------------------------------------------*/
extern void WinFreeDspWork( WIN_T *win );
extern int WinSetDspWork( WINSYS_T *wsys, WIN_T *win );
extern int WinDspChkOnFrame( WINSYS_T *wsys, WIN_T *win, REG FRAME *fr );
#endif